package com.study.springboot.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.study.springboot.common.mybatis.MonitorTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Admin
 * @since 2021-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "t_class",autoResultMap = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="Class对象", description="")
public class Class implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "删除状态：0-未删除、1-已删除")
    private String deleteStatus;

    @ApiModelProperty(value = "创建时间")
      @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
      @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    @ApiModelProperty("班主任")
    @TableField(typeHandler = MonitorTypeHandler.class)
    private Monitor monitor;

}
